<template>
    <div id="commentsContainer">
        <div class="commentsItem" v-for="item in recommend" :key="item.link">
            <a :href="item.link">
                <img :src="item.image" alt="">
                <p class="title">{{ item.title }}</p>
            </a>
        </div>
    </div>
</template>
<script>
import {getHomeMultidata} from '../../../network/home.js';
export default {
    data(){
        return {
            recommend:[]
        }
    },
    created(){
        getHomeMultidata()
        .then(res => {
            this.recommend = res.data.recommend.list;
        })
        .catch(error => {
            console.log(error);
        })
    }
}
</script>
<style lang="css">
    #commentsContainer{
        display: flex;
    }
    .commentsItem{
        flex:1;
        text-align: center;
    }
    .commentsItem img{
        width: 70px;
        height: 70px;
    }
    .commentsItem .title{
        text-align: center;
        font-size: 12px;
        margin-top: 5px;
        color: var(--color-text);
    }
</style>